/*
 * @description: 
 * @Date: 2023-03-29 17:06:30
 * @example: 
 * @params: 
 */
const express = require("express");
const cors = require('cors')
const app = express();
const server = require('http').createServer(app);
const port =  4000;

const expressSwagger = require('express-swagger-generator')(app)
const options = require('./utils/swagger/index')
app.use('/public/', express.static('./public/'))
app.use(require('./router/index'))

app.use(cors()) // 开启跨域支持




// 使用swagger API 文档
expressSwagger(options)


server.listen(port, () => {
  console.log(`multi-tenant Server listening to Port ${port}`);
});
